namespace CloudApiServer.Model;

/// <summary>
/// 一码付公共入参输入
/// </summary>
public class FsiRequestCfcHeader
{
    /// <summary>
    /// 业务系统编码或系统账号ID
    /// </summary>
    public string orgId { get; set; }

    /// <summary>
    /// 加密数据
    /// </summary>
    public string encData { get; set; }

    /// <summary>
    /// 版本号
    /// </summary>
    public string version { get; set; } = "1.0.0";

    /// <summary>
    /// 13位时间戳
    /// </summary>
    public string timestamp { get; set; }

    /// <summary>
    /// 请求方标识(规则：orgId+6位省级医保区划代码)
    /// </summary>
    public string reqtType { get; set; }
}

/// <summary>
/// 一码付公共出参 输出
/// </summary>
public class FsiCfcHeader
{
    /// <summary>
    /// 响应状态码
    /// </summary>
    public int code { get; set; }

    /// <summary>
    /// 响应信息
    /// </summary>
    public string message { get; set; }

    /// <summary>
    /// 加密数据（需要取data内的encData解析）
    /// </summary>
    public FsiCfcResponseData data { get; set; }

    /// <summary>
    /// 响应标识
    /// </summary>
    public string type { get; set; }

    /// <summary>
    /// 业务异常状态位
    /// </summary>
    public bool? success { get; set; }
}

/// <summary>
/// 一码付公共出参 数据
/// </summary>
public class FsiCfcResponseData 
{
    /// <summary>
    /// 加密后的数据
    /// </summary>
    public string encData { get; set; }
}

/// <summary>
/// 查询用户一码付状态 入参
/// </summary>
public class FsiRequestCfcSignedQueryInput
{
    /// <summary>
    /// 电子凭证令牌(ecToken)
    /// </summary>
    public string token { get; set; }

    /// <summary>
    /// 定点医药机构代码(国标编码)
    /// </summary>
    public string orgCodg { get; set; }

    /// <summary>
    /// 定点医药机构名称
    /// </summary>
    public string orgName { get; set; }

    /// <summary>
    /// 经办人员编号
    /// </summary>
    public string opterId { get; set; }

    /// <summary>
    /// 经办人员姓名
    /// </summary>
    public string opterName { get; set; }

    /// <summary>
    /// 设备唯一标识(如设备MAC地址)
    /// </summary>
    public string devId { get; set; }

    /// <summary>
    /// 设备网络IP
    /// </summary>
    public string devIP { get; set; }
}


/// <summary>
/// 查询用户一码付状态 出参
/// </summary>
public class FsiCfcSignedQueryOutput
{
    /// <summary>
    /// 状态标识(0-未签约不可用，1-已签约且可用，2-已签约不可用)
    /// </summary>
    public string stasFlag { get; set; }

    /// <summary>
    /// 不可用原因
    /// </summary>
    public string abnRea { get; set; }

    /// <summary>
    /// 支付渠道用户账号名
    /// </summary>
    public string payChnlUserName { get; set; }

    /// <summary>
    /// 支付渠道名称
    /// </summary>
    public string payChnlName { get; set; }
}

/// <summary>
/// 获取一码付付款凭据 入参
/// </summary>
public class FsiRequestCfcGenPayCertInput
{
    /// <summary>
    /// 电子凭证令牌(ecToken)
    /// </summary>
    public string token { get; set; }
    
    /// <summary>
    /// 现金支付金额
    /// </summary>
    public string ownPaySetlAmt { get; set; }

    /// <summary>
    /// 定点医药机构代码(国标编码)
    /// </summary>
    public string orgCodg { get; set; }

    /// <summary>
    /// 定点医药机构名称
    /// </summary>
    public string orgName { get; set; }

    /// <summary>
    /// 经办人员编号
    /// </summary>
    public string opterId { get; set; }

    /// <summary>
    /// 经办人员姓名
    /// </summary>
    public string opterName { get; set; }

    /// <summary>
    /// 设备唯一标识(如设备MAC地址)
    /// </summary>
    public string devId { get; set; }

    /// <summary>
    /// 设备网络IP
    /// </summary>
    public string devIP { get; set; }
    
    /// <summary>
    /// 定点医药机构交易流水号
    /// </summary>
    public string  fixmedinsTrnsSn { get; set; }
}


/// <summary>
/// 获取一码付付款凭据 出参
/// </summary>
public class FsiCfcGenPayCertOutput
{
    /// <summary>
    /// 付款凭据
    /// </summary>
    public string payCert { get; set; }

    /// <summary>
    /// 支付渠道用户账号名
    /// </summary>
    public string payChnlUserName { get; set; }

    /// <summary>
    /// 支付渠道名称
    /// </summary>
    public string payChnlName { get; set; }
}